Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add jobs #314

Merged
merged 9 commits into from
Oct 30, 2024
Merged

feat: add jobs #314

merged 9 commits into from
Oct 30, 2024

Conversation

tdstein
Copy link
Collaborator

@tdstein tdstein commented Oct 23, 2024

Adds job support.

The mixin pattern is continued, and a 'jobs' property is added to ContentItem.

A new abstraction around resources called Active is introduced. This abstraction begins a transition to a more idiomatic approach to interacting with collections. Similar to how printing a Resource shows a dict, the ActiveSequence shows a familiar List[dict] representation. The ActiveFinderMethods supports the find and find_by methods. This is inspired by this Ruby on Rails module https://api.rubyonrails.org/classes/ActiveRecord/FinderMethods.html. Ideally, this separation of concerns provides a straightforward way to compose bindings in the future and reduces the amount of duplication across implementations.

Additional background may be found here https://github.com/tdstein/active

Related to #310
Resolves #306

Copy link

github-actions bot commented Oct 23, 2024

☂️ Python Coverage

current status: ✅

Overall Coverage

Lines Covered Coverage Threshold Status
1424 1364 96% 0% 🟢

New Files

File Coverage Status
src/posit/connect/jobs.py 100% 🟢
TOTAL 100% 🟢

Modified Files

File Coverage Status
src/posit/connect/content.py 99% 🟢
src/posit/connect/context.py 100% 🟢
src/posit/connect/resources.py 94% 🟢
src/posit/connect/vanities.py 95% 🟢
TOTAL 97% 🟢

updated for commit: d87cfe7 by action🐍

Copy link
Collaborator

@toph-allen toph-allen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This generally looks good — but approving with the caveat that I don't feel like I fully grok some of the mechanisms at play here. Would be great to walk through the PR together so I can ask questions.

integration/tests/posit/connect/test_jobs.py Show resolved Hide resolved
src/posit/connect/content.py Show resolved Hide resolved
src/posit/connect/jobs.py Show resolved Hide resolved
src/posit/connect/jobs.py Show resolved Hide resolved
src/posit/connect/resources.py Outdated Show resolved Hide resolved
src/posit/connect/resources.py Outdated Show resolved Hide resolved
tests/posit/connect/test_jobs.py Show resolved Hide resolved
src/posit/connect/jobs.py Show resolved Hide resolved
src/posit/connect/jobs.py Show resolved Hide resolved
src/posit/connect/jobs.py Show resolved Hide resolved
src/posit/connect/jobs.py Show resolved Hide resolved
src/posit/connect/jobs.py Show resolved Hide resolved
src/posit/connect/resources.py Outdated Show resolved Hide resolved
src/posit/connect/resources.py Show resolved Hide resolved
src/posit/connect/resources.py Outdated Show resolved Hide resolved
src/posit/connect/resources.py Outdated Show resolved Hide resolved
src/posit/connect/jobs.py Show resolved Hide resolved
@tdstein
Copy link
Collaborator Author

tdstein commented Oct 24, 2024

@toph-allen and I met over Zoom to discuss his questions and talk about the code in more depth. Please let me know if anyone else would like to do the same. Happy to do so.

@tdstein tdstein merged commit 7c8acce into main Oct 30, 2024
33 checks passed
@tdstein tdstein deleted the tdstein/jobs branch October 30, 2024 01:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add Content Jobs endpoints
4 participants